package com.lottery.common.enums;

import lombok.Getter;

@Getter
public enum ResultCodeEnum {
    SUCCESS(200, "成功"),
    PARAM_ERROR(400, "参数错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "资源不存在"),
    INTERNAL_ERROR(500, "服务器内部错误"),
    
    // 业务错误码
    ACTIVITY_NOT_EXIST(1001, "活动不存在"),
    ACTIVITY_NOT_START(1002, "活动未开始"),
    ACTIVITY_ENDED(1003, "活动已结束"),
    ACTIVITY_TIME_INVALID(1004, "不在活动时间内"),
    PARTICIPATION_LIMIT(1005, "超出参与次数限制"),
    PRIZE_STOCK_EMPTY(1006, "奖品库存不足");

    private final Integer code;
    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
} 